﻿using System;
using System.Windows.Forms;
using DNNspot.LiveChat.Common;

namespace DNNspot.LiveChat.Keygen
{
    public partial class Default : Form
    {
        public Default()
        {
            InitializeComponent();
        }

        private void btnGenerate_Click(object sender, EventArgs e)
        {
            txtSerial.Text = Registration.GetRandomSerial();
        }

        private void btnValidate_Click(object sender, EventArgs e)
        {
            lblIsValid.Text = Registration.IsValidSerial(txtSerial.Text) ? "Valid" : "Invalid";
        }
    }
}
